/**
 * 文件：ControlContainer.java
 * 包名：com.ronri.list.editview.controls;   --- 正式发布时需要修正
 * 说明：编辑器容器
 * 作者：MS During
 * 日期：2017/4/15
 * 历史：
 */
package com.ronri.list.editview.controls;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

public class ControlContainer
        extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Bundle bundle = this.getIntent().getExtras();
        BaseControl control = (BaseControl)bundle.getSerializable("control");

        View view = control.getView();
        setContentView(view);
    }

    /****
     * 动态加载
     * @param savedInstanceState
     * @param nLayoutID
     */
    protected void onCreate(Bundle savedInstanceState, int nLayoutID){
        super.onCreate(savedInstanceState);
        BaseControl control = (BaseControl)getIntent().getSerializableExtra("Control");
        setContentView(control.getView());
    }
}
